package com.slj.springcloud.client;

import com.slj.springcloud.model.dto.PayDTO;
import com.slj.springcloud.model.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("cloud-pay")
public interface PayClient {
    @GetMapping(value = "/pay")
    Result<List<PayDTO>> findAll();

    @GetMapping("/pay/port")
    Result<String> getPort();

    @GetMapping("/pay/timeout")
    Result<String> timeout();

    @GetMapping("/pay/resilience")
    Result<String> circuit(@RequestParam("id") Long id);
}
